package variable

import (
	"sync"

	"github.com/beego/beego/v2/core/validation"
)

const (

	// 定义队列名称
	SendQu = "send_queue"
	TaskQu = "task_queue"

	DBS       = "DBS"
	UID       = "UID"
	BossUrl   = "https://www.zhipin.com/"
	NotifyUrl = "http://xxx.xx.xx.x:9091/notify/task/api"
	AppTitle  = "CityBoss"
	ExeName   = "gui.exe"
	UserIP    = "userIp"

	CookieKey  = "huijingcookie"
	TokenKey   = "_userToken"
	UserDtaKey = "_userdata"

	PwdKeyOld = "k7XWkCNolhKI8CzV" //暂时先这样写
	PwdCount  = "pwd_count"

	My_zset = "collect_list"

	DefaultLogPath = "log/"
	//MaxFileSize    = 2 * 1024 * 1024 // 2MB
	MB           = 1 << 20 // 1MB = 2^20 Bytes
	MaxFileSize  = 2 * MB
	ExpiresIn    = 86400
	DefaultScore = 1.0 // 默认优先级

	// 邮件服务器配置
	SmtpServer   = "smtp.163.com"     // 邮件服务器地址
	SmtpPort     = 587                // SMTP 端口（465 用于 SSL）
	SmtpPassword = "WOIGZZHLZLLBAYWH" // SMTP 密码
	// 发件人和收件人
	From = "wm224119@163.com"

	//文件路径
	DefaultAvatar = "/static/img/defAvatar/default.jpg"

	UploadImgSrc   = "/mnt/img/"
	UploadPDFSrc   = "/mnt/pdf/"
	UploadXlsxSrc  = "/mnt/xlsx/"
	UploadOtherSrc = "/mnt/other/"
)

// 认证状态类型
type AuthStatus string

const (
	AuthVerified   AuthStatus = "verified"
	AuthUnverified AuthStatus = "unverified"
)

var (
	Valid   validation.Validation
	Wg      sync.WaitGroup
	EndChan chan struct{}
	MbChan  chan string
	//JsonData chan string
	Uid     *string
	DataKey string
)

var (
	PwdKeyNew = []byte("hij-mal-666-asdfqwer-pwd") //暂时先这样写 （必须24位）
)

type CacheKey string

const (
	CountKey   CacheKey = "sms:count_"
	TimeoutKey CacheKey = "sms:timeout_"
)

type Email string

const (
	AuthorEmail   Email = "2474925081@qq.com"
	SmtpUserEmail Email = "wm224119@163.com" // SMTP 用户名
)
